//
//  PhysicsObject.h
//  CandyJump
//
//  Created by Bon Lam on 01/03/2011.
//  Copyright 2011 Peru Republic. All rights reserved.
//

#import "Model.h"
#import "chipmunk.h"

//=====================================================================================================================
@interface PhysicsObject : Model {
	
	//  Variables for Physics
	NSString* physicsBodyName;
	cpSpace *physicsSpace;
	cpBody *physicsBody;
	int addBody;		// 0 = static object, 1 = added to the space
}

//---------------------------------------------------------------------------------------------------------------------
@property(nonatomic, retain, readwrite)NSString* physicsBodyName;


//---------------------------------------------------------------------------------------------------------------------
#pragma mark PhysicsObject - Basic
- (id)init;
- (void)dealloc;
- (id)copyWithZone:(NSZone *)zone;

#pragma mark PhysicsObject - Setters and Getters
- (cpBody*)physicsBody;
- (void)setPosition:(CGPoint)point;

#pragma mark PhysicsObject - Physics
- (void)setUpPhysics:(cpSpace *)space;

#pragma mark PhysicsObject - Update
- (void)update:(ccTime)dt;
	
@end
